home *** CD-ROM | disk | FTP | other *** search
/ ADA Programming Guide / ADA Programming Guide.iso / ada_gnu / adainc / s-comexc.ads < prev    next >
Text File  |  1996-01-30  |  3KB  |  75 lines

  1. ------------------------------------------------------------------------------
  2. --                                                                          --
  3. --                 GNU ADA RUNTIME LIBRARY (GNARL) COMPONENTS               --
  4. --                                                                          --
  5. --            S Y S T E M . C O M P I L E R _ E X C E P T I O N S           --
  6. --                                                                          --
  7. --                                  S p e c                                 --
  8. --                                                                          --
  9. --                             $Revision: 1.7 $                             --
  10. --                                                                          --
  11. --       Copyright (c) 1991,1992,1993,1994, FSU, All Rights Reserved        --
  12. --                                                                          --
  13. -- GNARL is free software; you can redistribute it  and/or modify it  under --
  14. -- terms  of  the  GNU  Library General Public License  as published by the --
  15. -- Free Software  Foundation;  either version 2, or (at  your  option)  any --
  16. -- later  version.  GNARL is distributed  in the hope that  it will be use- --
  17. -- ful, but but WITHOUT ANY WARRANTY;  without even the implied warranty of --
  18. -- MERCHANTABILITY  or  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Gen- --
  19. -- eral Library Public License  for more details.  You should have received --
  20. -- a  copy of the GNU Library General Public License along with GNARL;  see --
  21. -- file COPYING.LIB.  If not,  write to the  Free Software Foundation,  675 --
  22. -- Mass Ave, Cambridge, MA 02139, USA.                                      --
  23. --                                                                          --
  24. ------------------------------------------------------------------------------
  25.  
  26. with System.Task_Primitives;
  27. --  Uses, Task_Primitives.Machine_Exceptions
  28. --        Task_Primitives.Error_Information
  29.  
  30. package System.Compiler_Exceptions is
  31.    --  This interface is described in the document
  32.    --  Gnu Ada Runtime Library Interface (GNARLI).
  33.  
  34.    type Exception_ID is private;
  35.    Null_Exception      : constant Exception_ID;
  36.    Constraint_Error_ID : constant Exception_ID;
  37.    Numeric_Error_ID    : constant Exception_ID;
  38.    Program_Error_ID    : constant Exception_ID;
  39.    Storage_Error_ID    : constant Exception_ID;
  40.    Tasking_Error_ID    : constant Exception_ID;
  41.  
  42.    type Pre_Call_State is private;
  43.  
  44.    procedure Raise_Exception (E : Exception_ID);
  45.  
  46.    procedure Notify_Exception
  47.      (Which              : Task_Primitives.Machine_Exceptions;
  48.       Info               :  Task_Primitives.Error_Information;
  49.       Modified_Registers : Pre_Call_State);
  50.  
  51.    function Current_Exception return Exception_ID;
  52.  
  53.    subtype Exception_ID_String is String (1 .. 16);
  54.  
  55.    function Image
  56.      (E    : Exception_ID)
  57.       return Exception_ID_String;
  58.  
  59. private
  60.    type Exception_ID is new Integer;
  61.  
  62.    Null_Exception      : constant Exception_ID := 0;
  63.    Constraint_Error_ID : constant Exception_ID := 1;
  64.    Numeric_Error_ID    : constant Exception_ID := 2;
  65.    Program_Error_ID    : constant Exception_ID := 3;
  66.    Storage_Error_ID    : constant Exception_ID := 4;
  67.    Tasking_Error_ID    : constant Exception_ID := 5;
  68.  
  69.    type tmp is record
  70.       d : integer;
  71.    end record;
  72.  
  73.    type Pre_Call_State is access tmp;
  74. end System.Compiler_Exceptions;
  75.